package com.ggh.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ggh.entity.RoomWinRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 近几局的房间输赢
 * @author jj
 * @date 2019/10/25 14:42
 */
@Mapper
@Repository
public interface RoomWinRecordMapper extends BaseMapper<RoomWinRecord> {
    @Select("select chu_win ,tian_win,mo_win from room_win_record where rid=#{roomid} order by creaty_time desc limit #{tiao}")
    List<RoomWinRecord> roomWinRecordList(int roomid,int tiao);

    @Select("select chu_win ,tian_win,mo_win from room_win_record  order by creaty_time desc limit #{tiao}")
    List<RoomWinRecord> aList(int tiao);
}
